package com.example.springaop_1.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * Date:2022-11-01
 * Time:23:04
 *
 * @Author: 东莞呵呵
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @RequestMapping("/sayhi")
    public String sayHi(){
        System.out.println("sayhi方法被执行");
        try {
            throw new NullPointerException();
        }
        catch (Exception e){
            return "Hello world!";
        }
    }
}
